﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ServiceModel;

namespace DDFolderSync
{
    public enum FileChangeType : short
    {
        Update = 1,
        Delete = 2,
        Create = 3

    }

    
    /// <summary>
    /// Defines the contract for the callback channel to the client. Also used to forward messages across roles.
    /// </summary>
    [ServiceContract(
        Namespace = "urn:dynamicdeploy.com:2012:1")]
    public interface IFileSync
    {
      /// <summary>
      /// Sends/Received a File Change event with file information
      /// </summary>
      /// <param name="fileInfo"></param>
      /// <param name="changeType"></param>
        [OperationContract(IsOneWay = true)]
        void FileChangeMessage(FileInformation fileInfo, FileChangeType changeType);

        //TODO: Also add a validate method to validate the change 
      
    }
}
